package 多线程.多线程实现示例;

public class 多线程_继承thread extends Thread {
    public int i;

    public 多线程_继承thread(int i) {
        this.i = i;
    }

    @Override
    public void run() {
        for (int j = 0; j < 10; j++) {
            System.out.println("现在是" + i + "线程的时间(继承thread类)~~");
            try {
                sleep(1500);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
